package 力扣;

import java.util.ArrayList;
import java.util.Scanner;

public class 质数 {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int start = scanner.nextInt();
        int end = scanner.nextInt();
        ArrayList<Integer> intlist = new ArrayList<Integer>();
        ArrayList<Integer> intlisto = new ArrayList<Integer>();
        for (int i = start;i<=end;i++){
          if (function1(i)) intlist.add(i);
        }
        int a=-1;
        for (int i=0;i<intlist.size()-1;){
            if(intlist.get(i+1)-intlist.get(i)==2){
                System.out.print(intlist.get(i)+" "+intlist.get(i+1)+" ");
                a = 1;
                i=i+2;
            }else i++;
        }
        if (a<0) System.out.println("no");
    }
    public static boolean function1(int a){
        if (a==2||a==3) return true;
        for(int m=2;m<=Math.sqrt(a);m++){
            if (a%m==0) return false;
        }
        return  true;
    }
}
